/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-11-20 13:44:37
 * @LastEditors: GGB
 * @LastEditTime: 2021-11-20 14:18:02
 */
import { Injectable } from '@nestjs/common';
import { teachers } from '../db';
import { FindTeacherResponseDto } from './dto/teacher.dto';

@Injectable()
export class TeacherService {
    private teachers = teachers
    getTeachers(): FindTeacherResponseDto[] {
        return this.teachers
    }

    getTeacherById(id: String): FindTeacherResponseDto {
        return this.teachers.find(teacher => teacher.id === id)
    }
}
